﻿using SD.ContentSystem.IAppService.DTOs.Outputs;
using SD.Infrastructure.AppServiceBase;
using SD.Infrastructure.DTOBase;
using System;
using System.Collections.Generic;
using System.ServiceModel;

namespace SD.ContentSystem.IAppService.Interfaces
{
    /// <summary>
    /// 链接服务契约接口
    /// </summary>
    [ServiceContract(Namespace = "http://SD.CMS.IAppService.Interfaces")]
    public interface ILinkContract : IApplicationService
    {
        //命令部分

        #region # 创建链接类别 —— void CreateLinkCategory(string categoryNo, string categoryName...
        /// <summary>
        /// 创建链接类别
        /// </summary>
        /// <param name="categoryNo">链接类别编号</param>
        /// <param name="categoryName">链接类别名称</param>
        /// <param name="sort">排序</param>
        [OperationContract]
        void CreateLinkCategory(string categoryNo, string categoryName, int sort);
        #endregion

        #region # 修改链接类别 —— void UpdateLinkCategory(Guid categoryId, string categoryName...
        /// <summary>
        /// 修改链接类别
        /// </summary>
        /// <param name="categoryId">链接类别Id</param>
        /// <param name="categoryName">链接类别名称</param>
        /// <param name="sort">排序</param>
        [OperationContract]
        void UpdateLinkCategory(Guid categoryId, string categoryName, int sort);
        #endregion

        #region # 删除链接类别 —— void RemoveLinkCategory(Guid categoryId)
        /// <summary>
        /// 删除链接类别
        /// </summary>
        /// <param name="categoryId">链接类别Id</param>
        [OperationContract]
        void RemoveLinkCategory(Guid categoryId);
        #endregion


        #region # 创建链接 —— void CreateLink(string linkCategoryNo, string linkName...
        /// <summary>
        /// 创建链接
        /// </summary>
        /// <param name="linkCategoryNo">链接类别编号</param>
        /// <param name="linkName">链接名称</param>
        /// <param name="url">链接地址</param>
        /// <param name="imagePath">图片路径</param>
        /// <param name="description">描述</param>
        [OperationContract]
        void CreateLink(string linkCategoryNo, string linkName, string url, string imagePath, string description);
        #endregion

        #region # 修改链接 —— void UpdateLink(Guid linkId, string linkName, string url...
        /// <summary>
        /// 修改链接
        /// </summary>
        /// <param name="linkId">链接Id</param>
        /// <param name="linkName">链接名称</param>
        /// <param name="url">链接地址</param>
        /// <param name="imagePath">图片路径</param>
        /// <param name="description">描述</param>
        [OperationContract]
        void UpdateLink(Guid linkId, string linkName, string url, string imagePath, string description);
        #endregion

        #region # 删除链接 —— void RemoveLink(Guid linkId)
        /// <summary>
        /// 删除链接
        /// </summary>
        /// <param name="linkId">链接Id</param>
        [OperationContract]
        void RemoveLink(Guid linkId);
        #endregion


        //查询部分

        #region # 获取链接类别 —— LinkCategoryInfo GetLinkCategory(Guid linkCategoryId)
        /// <summary>
        /// 获取链接类别
        /// </summary>
        /// <param name="linkCategoryId">链接类别Id</param>
        /// <returns>链接类别</returns>
        [OperationContract]
        LinkCategoryInfo GetLinkCategory(Guid linkCategoryId);
        #endregion

        #region # 获取链接类别 —— LinkCategoryInfo GetLinkCategoryByNo(string linkCategoryNo)
        /// <summary>
        /// 获取链接类别
        /// </summary>
        /// <param name="linkCategoryNo">链接类别编号</param>
        /// <returns>链接类别</returns>
        [OperationContract]
        LinkCategoryInfo GetLinkCategoryByNo(string linkCategoryNo);
        #endregion

        #region # 获取链接类别列表 —— IEnumerable<LinkCategoryInfo> GetLinkCategories()
        /// <summary>
        /// 获取链接类别列表
        /// </summary>
        /// <returns>链接类别列表</returns>
        [OperationContract]
        IEnumerable<LinkCategoryInfo> GetLinkCategories();
        #endregion

        #region # 分页获取链接类别列表 —— PageModel<LinkCategoryInfo> GetLinkCategoriesByPage(...
        /// <summary>
        /// 分页获取链接类别列表
        /// </summary>
        /// <param name="keywords">关键字</param>
        /// <param name="pageIndex">页码</param>
        /// <param name="pageSize">页容量</param>
        /// <returns>链接类别列表</returns>
        [OperationContract]
        PageModel<LinkCategoryInfo> GetLinkCategoriesByPage(string keywords, int pageIndex, int pageSize);
        #endregion


        #region # 获取链接 —— LinkInfo GetLink(Guid linkId)
        /// <summary>
        /// 获取链接
        /// </summary>
        /// <param name="linkId">链接Id</param>
        /// <returns>链接</returns>
        [OperationContract]
        LinkInfo GetLink(Guid linkId);
        #endregion

        #region # 分页获取链接列表 —— PageModel<LinkInfo> GetLinksByPage(string linkCategoryNo...
        /// <summary>
        /// 分页获取链接列表
        /// </summary>
        /// <param name="linkCategoryNo">链接类别编号</param>
        /// <param name="pageIndex">页码</param>
        /// <param name="pageSize">页容量</param>
        /// <returns>链接列表</returns>
        [OperationContract]
        PageModel<LinkInfo> GetLinksByPage(string linkCategoryNo, int pageIndex, int pageSize);
        #endregion

        #region # 根据链接类别获取链接列表 —— IEnumerable<LinkInfo> GetLinksByCategory(string...
        /// <summary>
        /// 根据链接类别获取链接列表
        /// </summary>
        /// <param name="linkCategoryNo">链接类别编号</param>
        /// <returns>链接列表</returns>
        [OperationContract]
        IEnumerable<LinkInfo> GetLinksByCategory(string linkCategoryNo);
        #endregion
    }
}
